xl: make "xl list -l" proper JSON
authorIan Campbell <ian.campbell@citrix.com>
Thu, 23 Aug 2012 18:12:28 +0000 (19:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 23 Aug 2012 18:12:28 +0000 (19:12 +0100)
commitac963eb7895b8351017bb6005505c2b176202f0e
tree90495680f78a96e1a25510a516b3f751bffb29fa
parent7eaccb3cc3fabdde1fe7ef55300941f5520ca785
xl: make "xl list -l" proper JSON

Bastian Blank reports that the output of this command is just multiple
JSON objects concatenated and is not a single properly formed JSON
object.

Fix this by wrapping in an array. This turned out to be a bit more
intrusive than I was expecting due to the requirement to keep
supporting the SXP output mode.

Python's json module is happy to parse the result...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c